import 'dart:math' as Math;
import 'package:flutter/material.dart';

class OuterPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    Paint paint = Paint()
      ..color = Color.fromRGBO(51, 51, 51, 1)
      ..strokeWidth = 6
      ..isAntiAlias = true
      ..style = PaintingStyle.stroke;

    Rect rect = Rect.fromCircle(
      center: Offset(size.width / 2, size.height / 2),
      radius: size.width / 2,
    );

    canvas.drawArc(rect, 0.0, Math.pi / 2, false, paint);
    canvas.drawArc(rect, Math.pi, Math.pi / 2, false, paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}

class InnerPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    Paint paint = Paint()
      ..color = Color.fromRGBO(186, 56, 44, 1)
      ..strokeWidth = 6
      ..isAntiAlias = true
      ..style = PaintingStyle.stroke;

    Rect rect = Rect.fromCircle(
      center: Offset(size.width / 2, size.height / 2),
      radius: size.width / 2,
    );

    canvas.drawArc(rect, 3 * Math.pi / 2, Math.pi / 2, false, paint);
    canvas.drawArc(rect, Math.pi / 2, Math.pi / 2, false, paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}
